import 'package:fluro/fluro.dart';
import 'package:flutter/material.dart';
import 'package:imperius_insights/modules/skeleton/screen.dart';
import 'package:imperius_insights/startup.dart';
import 'package:imperius_insights/treaty/palette.dart';
import 'package:intl/date_symbol_data_local.dart';
import 'package:provider/provider.dart';

void main() async {
  await initializeDateFormatting();
  setup();
  runApp(MultiProvider(
    providers: createProviders(),
    child: MyApp(),
  ));
}

class MyApp extends StatelessWidget {
  // This widget is the root of your application.
  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      title: 'Imperius Insights',
      theme: ThemeData(
        primaryColor: palette.theme,
      ),
      onGenerateRoute: (routeSetting) => Provider.of<Router>(context).generator(routeSetting, context: context),
      home: Screen(),
    );
  }
}